package com.autumn.annotations.value.config;

import com.autumn.annotations.value.profiles.Profiles;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.context.annotation.PropertySource;

/**
 * ClassName: ProfileDemoConfig
 *
 * @Description:
 * @Author: wangqiuyang
 * @Date: 2022/1/26 1:51 下午
 * History:
 * <author>          <time>          <version>          <desc>
 * wangqiuyang    2022/1/26 1:51 下午   @Version 1.0        描述
 */
@Configuration
@PropertySource(value = "classpath:/profile.properties")
public class ProfileDemoConfig {


    @Profile("dev")
    @Bean("profiles-dev")
    public Profiles profiles1(){
        return new Profiles("dev");
    }

    @Profile("fat")
    @Bean("profiles-fat")
    public Profiles profiles2(){
        return new Profiles("fat");
    }
}
